diff options
| author | Anurag <anurag4884@gmail.com> | 2024-02-28 21:13:25 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-28 10:43:25 -0500 |
| commit | 2f991e680bea37d1f97ea77df2343200f3899817 (patch) | |
| tree | 2f043e4aafaa99340b8fac6153f1741d9dbb7ab2 /src/app/groups/[groupId]/stats/totals-group-spending.tsx | |
| parent | 2af066038351ab0634c359a688fe712a539992b4 (diff) | |
feat: initialise a new totals tab with basic UI (#94)
* feat: initialise a new totals tab with basic UI
* fix: update group tabs and add stats page
* fix: styling within the new elements
* Prettier
* Display active user expenses only if active user is set
---------
Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
Diffstat (limited to 'src/app/groups/[groupId]/stats/totals-group-spending.tsx')
| -rw-r--r-- | src/app/groups/[groupId]/stats/totals-group-spending.tsx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/app/groups/[groupId]/stats/totals-group-spending.tsx b/src/app/groups/[groupId]/stats/totals-group-spending.tsx new file mode 100644 index 0000000..3c0c96d --- /dev/null +++ b/src/app/groups/[groupId]/stats/totals-group-spending.tsx @@ -0,0 +1,17 @@ +import { formatCurrency } from '@/lib/utils' + +type Props = { + totalGroupSpendings: number + currency: string +} + +export function TotalsGroupSpending({ totalGroupSpendings, currency }: Props) { + return ( + <div> + <div className="text-muted-foreground">Total group spendings</div> + <div className="text-lg"> + {formatCurrency(currency, totalGroupSpendings)} + </div> + </div> + ) +} |
